<template>
	<view class="app-pages">
		<view class="cell" style="border-radius: 10rpx 10rpx 0 0;">
			<view class="">
				<u--image radius="10rpx" :showLoading="true" src="https://cdn.uviewui.com/uview/swiper/swiper1.png"
					width="100%" height="300rpx" />
			</view>
			<view class="title padding">
				<text>中央电视塔</text>
				<text>010-68450751</text>
			</view>
		</view>

		<view class="cell">
			<view class="time padding" @click="show = true">
				<view class="">预订时间</view>
				<view class="right">
					<text style="margin-right: 10rpx;">07月06日</text>
					<u-icon name="arrow-right" size="24rpx" color="rgb(144, 147, 153)"></u-icon>
				</view>
			</view>
		</view>

		<view class="cell">
			<view class="padding">
				<u-cell v-for="item in 3" :key="item">
					<view class="" slot="title">成人登塔门票</view>
					<view class="app-pirce-color" slot="label">
						<text style="font-size: 24rpx;">￥</text>
						<text>80</text>
					</view>
					<view class="submit" slot="value" @click="submit">预订</view>
				</u-cell>
			</view>
		</view>

		<!-- 日历 -->
		<u-calendar :show="show" mode="single" showLunar color="#f74062" @confirm="confirm" @close="cencel"
			title="请选择日期"></u-calendar>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				show: false
			}
		},
		methods: {
			confirm(options) {
				console.log('选择的内容', options)
				this.show = false
			},
			cencel(options) {
				this.show = false
			},
			submit(options) {
				uni.navigateTo({
					url: `/homePages/scenicSpot/reserve?data=${JSON.stringify(options)}`
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	::v-deep .u-cell {
		&+.u-cell {
			.u-line {
				opacity: 0;
			}
		}
	}

	.cell {
		margin-top: 30rpx;
		box-shadow: 0 0 4rpx #ccc;

		.app-pirce-color {
			padding-top: 30rpx;
			font-size: 30rpx;
		}

		.time {
			display: flex;
			justify-content: space-between;

			.right {
				display: flex;
				align-items: center;
			}
		}

		.submit {
			padding: 15rpx 35rpx;
			border-radius: 4rpx;
			color: #FFFFFF;
			background-color: #f74062;
		}

		.padding {
			padding: 20rpx 30rpx 20rpx 30rpx;
		}

		.title {
			padding-bottom: 30rpx;
			padding-top: 40rpx;
			display: flex;
			justify-content: space-between;
		}
	}
</style>
